GXScaleTransform
You can use theGXScaleTransform
function to alter the mapping property of a transform object so that it scales its associated shape by specified horizontal and vertical factors about a specified origin.
void GXScaleTransform(gxTransform target, Fixed hScale, Fixed vScale, Fixed xOffset, Fixed yOffset);
target
- A reference to the transform object whose mapping property you want to alter.
hScale
- The horizontal scaling factor.
vScale
- The vertical scaling factor.
xOffset
- The horizontal coordinate of the origin to scale about.
yOffset
- The vertical coordinate of the origin to scale about.
DESCRIPTION
TheGXScaleTransform
function calculates a new mapping matrix for the transform object referenced by thetarget
parameter. When applied to a shape, the new mapping matrix performs the same mapping transformations on the shape as the original matrix, but the new matrix also scales the shape horizontally by the factor indicated by thehScale
parameter and vertically by the factor indicated by thevScale
parameter. The new matrix scales the shape about the origin specified by thexOffset
andyOffset
parameters. (The origin is the point whose coordinates do not change as a result of the scaling operation.)A value of
ff(1)
for thehScale
orvScale
parameter indicates no change of scale in the corresponding direction.The coordinates of the origin are specified in local space.
ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory transform_is_nil Warnings scale_transform_out_of_range Notices (debugging version) mapping_unaffected SEE ALSO
For examples of the use of this function, see page 6-17 and Listing 6-3 on page 6-25.For information about mapping matrices in general, see the mathematics chapter of Inside Macintosh: QuickDraw GX Environment and Utilities.
To scale a shape by altering its geometry, use the
GXScaleShape
function, described on page 6-68.